package joc.internal.transformer;

import javassist.CtClass;
import javassist.CtMethod;
import javassist.Modifier;

public abstract class DeclaredMethodTransformer extends ClassTransformer {

	public DeclaredMethodTransformer(Transformer transformer) {
		super(transformer);
	}

	@Override
	public void transform(CtClass clazz) throws Exception {
		for (CtMethod method : clazz.getDeclaredMethods()) {
			if (!Modifier.isAbstract(method.getModifiers())) {
				transform(clazz, method);
			}
		}
	}

	public abstract void transform(CtClass clazz, CtMethod method) throws Exception;
}
